/*
 * @Author: xujiawei 
 * @Date: 2021-08-04 10:52:12 
 * @Last Modified by: xujiawei
 * @Last Modified time: 2021-08-04 11:02:52
 */

import { LogLevel } from "../../Define";
import { ClientConfig } from "../../ClientConfig";

export class Log {
    static debug(...args): void {
        if (CC_PREVIEW || LogLevel.DEBUG >= ClientConfig.logLevel)
            console.debug.apply(console, args);
    }

    static info(...args): void {
        if (CC_PREVIEW || LogLevel.INFO >= ClientConfig.logLevel)
            console.info.apply(console, args);
    }

    static warn(...args): void {
        if (CC_PREVIEW || LogLevel.WARN >= ClientConfig.logLevel)
            console.warn.apply(console, args);
    }

    static error(...args): void {
        if (CC_PREVIEW || LogLevel.ERROR >= ClientConfig.logLevel)
            console.error.apply(console, args);
    }
}